Twitter Feed

Xataface Maillist

Sign up to receive the Xataface news letter with weekly updates and development tips.

Found 1 of 138 records in table Wiki
Now Showing 1 of 1

Current Record: setPassword

setPassword Application Delegate Method


Optional method in application delegate class to override how to set the password via the change_password action.

You can throw an exception to disallow setting the password entirely.


function setPassword($password) {
    $user = $this->getLoggedInUser();
    if ( !$user ){
        throw new Exception("Failed to set password because there is no logged in user.");
    $user->setValue($this->passwordColumn, $password);
    $res = $user->save();
    if ( PEAR::isError($res) ){
        throw new Exception($res->getMessage());
    return true;
blog comments powered by Disqus
Powered by Xataface
(c) 2005-2018 All rights reserved