Support the ongoing development of Laravel.io →
Authentication Packages
Last updated 1 month ago.
0

In the Sentry config files, you can specify which User class you want Sentry to use. Make sure your User model extends the Sentry User.

Last updated 1 month ago.
0

JeroenVanOort said:

In the Sentry config files, you can specify which User class you want Sentry to use. Make sure your User model extends the Sentry User.

Thanks for reply

What i did

In models/User.php

class User extends \Cartalyst\Sentry\Users\Eloquent\User implements UserInterface, RemindableInterface {
	 use \Codesleeve\Stapler\Stapler;
  	public function __construct(array $attributes = array()) {
	      $this->hasAttachedFile('avatar', [
	          'styles' => [
	            'avatar-small' => '29x29'
	          ]
	      ]);
	      parent::__construct($attributes);
  	}

In sentry config

	'users' => array(	
		'model' => '\User',
	),

But i got following error

Symfony \ Component \ Debug \ Exception \ FatalErrorException
Call to a member function url() on a non-object
--
Sentry::getUser()->avatar->url('avatar-small');
Last updated 1 month ago.
0

It woks , Actually i had to change config in app/config/package

but i did wrong

Now working fine.

Thanks JeroenVanOort

Last updated 1 month ago.
0

Sign in to participate in this thread!

Cloudways

Your banner here too?

sdhiraj sdhiraj sdhiraj Joined 5 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.