public function encrypt_regmail_key($uid, $email) { $mail_check_pwd = Kohana::config('site_config.site.register_mail_check_pwd'); $key = Mytool::hash(Mytool::hash(Mytool::hash($mail_check_pwd) . $email) . $uid); return $key; }
/** * user register * * @param Array register data * @return Int user id */ public function register($data) { $user = ORM::factory('user'); $data['password'] = Mytool::hash($data['password']); if ($user->validate($data, FALSE)) { $user->save(); return $user->id; } else { return FALSE; } }