salix/db/changes/10221-accountModule/00-myUser_changePassword.sql

18 lines
555 B
SQL

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;