Habari\User::get PHP Метод

get() публичный статический Метод

This is a wrapper function that will invoke the appropriate get_by_* method.
public static get ( mixed $who ) : object
$who mixed user ID, username, or e-mail address
Результат object User object, or false
    public static function get($who)
    {
        if ($who instanceof User) {
            $user = $who;
        } elseif (is_numeric($who)) {
            // Got a User ID
            $user = self::get_by_id($who);
        } else {
            // Got username or email
            $user = self::get_by_name($who);
            if (!$user && strpos($who, '@') !== false) {
                // Got an email address
                $user = self::get_by_email($who);
            }
        }
        // $user will be a user object, or false depending on the
        // results of the get_by_* method called above
        return $user;
    }