Добавлено запоминание регистрационного IP адреса

This commit is contained in:
ErickSkrauch
2016-08-18 02:55:52 +03:00
parent 433f560f48
commit 59f51451d0
5 changed files with 63 additions and 0 deletions

View File

@@ -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);
}
}