예제 #1
0
 static function FetchFromString($string = '')
 {
     list($email, $crypted_password) = explode('|', $string);
     // valid?
     if (($user = AppUser::FetchUser($email)) instanceof User && $user->crypted_password == $crypted_password) {
         return AppUser::SetCurrent($user);
     } else {
         return false;
     }
 }