diff --git a/app/models/Data/User.php b/app/models/Data/User.php index 22a7df7..df02c81 100644 --- a/app/models/Data/User.php +++ b/app/models/Data/User.php @@ -295,6 +295,20 @@ class User extends Model return $this->linkedin_id; } + /** + * @param string $provider + * @param string $id + * @return $this + */ + public function setOAuthId($provider, $id) + { + $method = 'set' . ucfirst($provider) . 'Id'; + if (method_exists($this, $method)) { + $this->$method($id); + } + return $this; + } + /** * @param string $id * @return User