Beispiel #1
0
 private function setUserProfileFromUrl($url, $destination)
 {
     $user = Sentry::getUser();
     $fileId = FileApi::uploadFromURL($url, $destination);
     // the old file needs to be deleted at this instance if not default
     DB::table('user_details')->where('user_id', $user->id)->update(array('user_profile_img' => $fileId));
     $subscriber = new SentryuserEventHandler();
     Event::subscribe($subscriber);
     Event::fire('sentryuser.profilechange', $user);
     return true;
 }