DROP PROCEDURE IF EXISTS account.myUser_changePassword;

DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `account`.`myUser_changePassword`(vOldPassword VARCHAR(255), vPassword VARCHAR(255))
BEGIN
/**
 * Changes the current user password, if user is in recovery mode ignores the 
 * current password.
 *
 * @param vOldPassword The current password
 * @param vPassword The new password
 */
	CALL user_changePassword(myUser_getId(), vOldPassword, vPassword);
END$$
DELIMITER ;

GRANT EXECUTE ON PROCEDURE account.myUser_changePassword TO account@localhost;
