I installed and configured the plugin but I get an error that the password can´t be changed, ith elog I get this error:
[16-Jul-2012 20:53:54 -0600]: DB Error: MDB2 Error: not found Query: _doQuery: [Error message: Could not execute statement] [Last executed query: SELECT update_passwd('$1$O86/gN9M$cOXeHqPigXplyQ8Y8j.Qb/', '[email protected]')] [Native code: 1305] [Native message: FUNCTION servidp0_rnd3.update_passwd does not exist] in /home3/servidp0/public_html/mxibs/correo/program/include/rcube_mdb2.php on line 719 (POST /correo/?_task=settings&_action=plugin.password-save?_task=&_action=)
When I try to run mysql according to the read me instructions to create the variable:
CREATE FUNCTION update_password (oldpass text, cryptpass text, user text) RETURNS text
MODIFIES SQL DATA
BEGIN
DECLARE currentsal varchar(20);
DECLARE error text;
SET error = 'incorrect current password';
SELECT substring_index(substr(user.password,4),_latin1'$',1) INTO currentsalt FROM users WHERE username=user;
SELECT '' INTO error FROM users WHERE username=user AND password=ENCRYPT(oldpass,currentsalt);
UPDATE users SET password=cryptpass WHERE username=user AND password=ENCRYPT(oldpass,currentsalt);
RETURN error;
END
I get this error:
Error
consulta SQL:
CREATE FUNCTION update_password(
oldpass text,
cryptpass text,
user text
) RETURNS textMODIFIES SQL DATA BEGIN DECLARE currentsal varchar( 20 ) ;
MySQL ha dicho: Documentación
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
I´m clueless, any help please...
I am also experiencing the same problem... Could anyone help us??
Looks like a problem with delimiter. Try this:
mysql> delimiter //
mysql> CREATE FUNCTION update_password (oldpass text, cryptpass text, user text) RETURNS text
...
END//
mysql> delimiter ;
Are you sure you know what you're doing? This function is just an example, in most cases you'll need a simple SQL UPDATE query.