Example #1
0
inline int Account_Srv_Verify(char usrName[], char pwd[],int type)
{
	int rtn=0;
	account_t buf;
	if(Account_Perst_SelByName(usrName,&buf))
	{
		if(0==strcmp(pwd,buf.password) && buf.type==type)
		{
			rtn=1;
		}
	}
	return rtn;
}
Example #2
0
//验证登录账号是否已存在,存在,保存登录用户信息到全局变量gl_CurUser,return 1;否则return 0
inline int Account_Srv_Verify(char usrName[], char pwd[]){
	account_t usr;
	int n=0;
	
	if(Account_Perst_SelByName(usrName,&usr))
	{
		if(strcmp(pwd,usr.password)==0){
			n=1;
			gl_CurUser.id=usr.id;
			strcpy(gl_CurUser.password,usr.password);
			gl_CurUser.type=usr.type;
			strcpy(gl_CurUser.username,usr.username);
		}
	}
	return n;
}
Example #3
0
inline int Account_Srv_FetchByName(char usrName[], account_t *buf)
{
	return Account_Perst_SelByName(usrName,buf);
}