<commit_before><?php
namespace Home\Controller;
use Think\Controller;
class UserController extends GlobalAction
{
    public function _initialize()
    {
        parent::_initialize();
    }
    public function login()
    {       
        $uc = new \Ucenter\Client\Client();
        list($uid, $username, $password, $email) = $uc->uc_user_login($_GET['username'], $_GET['password']);
        if ($uid > 0) {
            $this->success('登录成功' . $uc->uc_user_synlogin($uid), U('index/index'), 5);
        } elseif ($uid == -1) {
            $this->error('用户不存在,或者被删除');
        } elseif ($uid == -2) {
            $this->error('密码错');
        } else {
            $this->error('未定义');
        }
    }
    public function logout()
    {       
        $uc = new \Ucenter\Client\Client();
        $this->success('注销成功' . $uc->uc_user_synlogout(), U('index/index'), 5);
    }
    public function messagecenter($action=0,$inf='',$inf2='')
    {       
        $uc = new \Ucenter\Client\Client();
		list($uid, $username) = getuserinfo();
        header('Location:'.$uc->uc_pm_location($uid,$action,$inf,$inf2));
    }
	public function register(){
		$this->show();
	}
	public function registerdeal(){
        $uc = new \Ucenter\Client\Client();
		$uid = $uc->uc_user_register($_POST['username'], $_POST['password'], $_POST['email'], get_client_ip());
		if($uid <= 0) {
			if($uid == -1) {
				$this->error('用户名不合法');
			} elseif($uid == -2) {
				$this->error('包含不允许注册的词语');
			} elseif($uid == -3) {
				$this->error('用户名已经存在');
			} elseif($uid == -4) {
				$this->error('Email 格式有误');
			} elseif($uid == -5) {
				$this->error('Email 不允许注册');
			} elseif($uid == -6) {
				$this->error('该 Email 已经被注册');<commit_msg>messagecenter<commit_after><?php
namespace Home\Controller;
use Think\Controller;
class UserController extends GlobalAction
{
    public function _initialize()
    {
        parent::_initialize();
    }
    public function login()
    {       
        $uc = new \Ucenter\Client\Client();
        list($uid, $username, $password, $email) = $uc->uc_user_login($_GET['username'], $_GET['password']);
        if ($uid > 0) {
            $this->success('登录成功' . $uc->uc_user_synlogin($uid), U('index/index'), 5);
        } elseif ($uid == -1) {
            $this->error('用户不存在,或者被删除');
        } elseif ($uid == -2) {
            $this->error('密码错');
        } else {
            $this->error('未定义');
        }
    }
    public function logout()
    {       
        $uc = new \Ucenter\Client\Client();
        $this->success('注销成功' . $uc->uc_user_synlogout(), U('index/index'), 5);
    }
    public function messagecenter($action=0,$inf='',$inf2='')
    {       
        $uc = new \Ucenter\Client\Client();
		list($uid, $username) = getuserinfo();
		$this->assign('location', $uc->uc_pm_location($uid,$action,$inf,$inf2));
		$this->show();
        //header('Location:'.$uc->uc_pm_location($uid,$action,$inf,$inf2));
    }
	public function register(){
		$this->show();
	}
	public function registerdeal(){
        $uc = new \Ucenter\Client\Client();
		$uid = $uc->uc_user_register($_POST['username'], $_POST['password'], $_POST['email'], get_client_ip());
		if($uid <= 0) {
			if($uid == -1) {
				$this->error('用户名不合法');
			} elseif($uid == -2) {
				$this->error('包含不允许注册的词语');
			} elseif($uid == -3) {
				$this->error('用户名已经存在');
			} elseif($uid == -4) {
				$this->error('Email 格式有误');
			} elseif($uid == -5) {
				$this->error('Email 不允许注册');
			} elseif($uid == -6) {
				$this->error('该 Email 已经被注册');
{'fraction_non_alphanumeric': 0.21517907902217168, 'fraction_numerical': 0.008811824900511654, 'mean_word_length': 2.7159450897571276, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 42, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '8028', 'n_tokens_mistral': 1313, 'n_tokens_neox': 1298, 'n_words': 204}