Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorkkrzyzak
     
    Hi.
    I'm using akelos admin plugin. Everything was fine, but suddenly autenthicate function stopped working
    this code:

    if($User =& $UserInstance->find('first', array('conditions'=>array($login_or_email.' = ? AND __owner.is_enabled = ? AND _roles.is_enabled = ?', $login, true, true), 'include'=>'role')) && $User->isValidPassword($password)){
    $User->set('last_login_at', Ak::getDate());
    $User->save();
    return $User;
    }

    should return sql like

    SELECT __owner.id AS __owner_id, __owner.login AS __owner_login, __owner.email AS __owner_email, __owner.password AS __owner_password, __owner.password_salt AS __owner_password_salt, __owner.last_login_at AS __owner_last_login_at, __owner.is_enabled AS __owner_is_enabled, __owner.updated_at AS __owner_updated_at, __owner.created_at AS __owner_created_at, _roles.id AS _roles_id, _roles.name AS _roles_name, _roles.description AS _roles_description, _roles.is_enabled AS _roles_is_enabled, _roles.parent_id AS _roles_parent_id, _roles.lft AS _roles_lft, _roles.rgt AS _roles_rgt, _roles.updated_at AS _roles_updated_at, _roles.created_at AS _roles_created_at FROM users AS __owner LEFT OUTER JOIN roles_users AS _RoleUser ON __owner.id = _RoleUser.user_id LEFT OUTER JOIN roles AS _roles ON _roles.id = _RoleUser.role_id WHERE __owner.login = ? AND __owner.is_enabled = ? AND _roles.is_enabled = ?

    but now, it returns
    SELECT * FROM users WHERE login = ? AND __owner.is_enabled = ? AND _roles.is_enabled = ?
    and it obviously returns error:
    Unknown column '__owner.is_enabled' in 'where clause'

    what's the problem? how should I fix that?
    •  
      CommentAuthorbermi
     

    Are you using Akelos trunk version?

    • CommentAuthorkkrzyzak
     
    i'm not sure. Propably I'm using this version: http://www.akelos.org/releases/akelos_framework-0.9.tar.gz - however, I don't remember wich version I've downloaded, and I don't know any way to check version. version.txt has 0.9...