mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge pull request #611 from openclassify/dia
#1753 [dress-theme] everyscarfs.com eksikler ve buglar ve istekler
This commit is contained in:
commit
29a6799ed4
@ -1,6 +1,7 @@
|
||||
<?php namespace Visiosoft\AdvsModule;
|
||||
|
||||
use Anomaly\Streams\Platform\Addon\Plugin\Plugin;
|
||||
use Twig_Environment;
|
||||
use Visiosoft\AdvsModule\Adv\AdvModel;
|
||||
use Visiosoft\AdvsModule\Adv\Command\appendRequestURL;
|
||||
use Visiosoft\AdvsModule\Adv\Command\GetAd;
|
||||
@ -87,6 +88,18 @@ class AdvsModulePlugin extends Plugin
|
||||
->where('status', 'passive')
|
||||
->get();
|
||||
}
|
||||
),
|
||||
new \Twig_SimpleFunction(
|
||||
'fn',
|
||||
function (Twig_Environment $twig, $name, ...$args) {
|
||||
$fn = $twig->getFunction($name);
|
||||
|
||||
if ($fn === false) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $fn->getCallable()(...$args);
|
||||
}, ['needs_environment' => true]
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
@ -33,4 +33,8 @@ return [
|
||||
'email_phone_not_found' => 'The E-mail, Phone Number is not correct!',
|
||||
|
||||
'disable_account' => 'Do you want to close your account? This operation cannot be undone.',
|
||||
|
||||
// Mail
|
||||
'update_email_mail_subject' => 'Email Updated!',
|
||||
'update_email_mail_message' => 'Your Email Has Been Updated!',
|
||||
];
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
<label class="control-label font-weight-bold">
|
||||
{{ trans("visiosoft.module.profile::field.email.name") }}
|
||||
</label>
|
||||
<input value="{{ user.email }}" type="text" disabled class="form-control">
|
||||
{{ userForm.fields.email.input|raw }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ userForm.actions|raw }}
|
||||
|
||||
@ -16,6 +16,9 @@ class UserFormBuilder extends FormBuilder
|
||||
'last_name' => [
|
||||
'required' => true,
|
||||
],
|
||||
'email' => [
|
||||
'required' => true,
|
||||
],
|
||||
];
|
||||
|
||||
protected $actions = [
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
use Anomaly\Streams\Platform\Message\MessageBag;
|
||||
use Anomaly\UsersModule\User\UserModel;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Visiosoft\NotificationsModule\Notify\Notification\UserUpdateEmailMail;
|
||||
|
||||
class UserFormHandler
|
||||
{
|
||||
@ -16,8 +17,14 @@ class UserFormHandler
|
||||
return;
|
||||
}
|
||||
|
||||
$userModel->find(Auth::id())
|
||||
->update($builder->getPostData());
|
||||
$data = $builder->getPostData();
|
||||
|
||||
$user = $userModel->find(\auth()->id());
|
||||
if ($user->email != $data['email']) {
|
||||
$user->notify(new UserUpdateEmailMail());
|
||||
}
|
||||
|
||||
$user->update($builder->getPostData());
|
||||
$messages->success(trans('visiosoft.module.profile::message.success_update'));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user