mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Добавлено запоминание регистрационного IP адреса
This commit is contained in:
@@ -22,6 +22,7 @@ use const common\LATEST_RULES_VERSION;
|
||||
* @property string $lang
|
||||
* @property integer $status
|
||||
* @property integer $rules_agreement_version
|
||||
* @property string $registration_ip
|
||||
* @property integer $created_at
|
||||
* @property integer $updated_at
|
||||
* @property integer $password_changed_at
|
||||
@@ -198,4 +199,12 @@ class Account extends ActiveRecord {
|
||||
return $this->rules_agreement_version === LATEST_RULES_VERSION;
|
||||
}
|
||||
|
||||
public function setRegistrationIp($ip) {
|
||||
$this->registration_ip = $ip === null ? null : inet_pton($ip);
|
||||
}
|
||||
|
||||
public function getRegistrationIp() {
|
||||
return $this->registration_ip === null ? null : inet_ntop($this->registration_ip);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user