application/manage/logic/LoginLogic.php
public static function doLogin($user_name, $user_pass)
    {
        $res = MemberLogic::instance()->checkLogin($user_name, $user_pass);
        if ($res['code'] != MemberLogic::TYPE_USER_LOGIN) {
            return Format::formatResult(0, $res['msg']);
        }
        $user = $res['data']['user'];
        $group = $res['data']['group'];
        
        $login_driver = self::getLoginDriver();
        $data = [
            'user_id' => $user['id'],
            'manage_url' => Url::build($group['home_page'])
        ];
        $login_driver->storageLogin(self::LOGIN_KEY, $data);
        
        return Format::formatResult(1, '登录成功', $data['manage_url']);
    }
public static function doLogin($user_name, $user_pass)
    {
        $res = MemberLogic::instance()->checkLogin($user_name, $user_pass);
        if ($res['code'] != MemberLogic::TYPE_USER_LOGIN) {
            return Format::formatResult(0, $res['msg']);
        }
        $user = $res['data']['user'];
        $group = $res['data']['group'];
        
        $login_driver = self::getLoginDriver();
        $data = [
            'user_id' => $user['id'],
            'manage_url' => Url::build($group['home_page'])
        ];
        $login_driver->storageLogin(self::LOGIN_KEY, $data);
        
        return Format::formatResult(1, '登录成功', $data['manage_url']);
    }
登录操作

@param string $user_name
@param string $user_pass
@return array